//
//  RecommendTableCell.m
//  项目A_百思不得姐
//
//  Created by wudongyang on 16/5/25.
//  Copyright © 2016年 wudongyang. All rights reserved.
//

#import "RecommendTableCell.h"

@implementation RecommendTableCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.nameLabel = [[UILabel alloc] init];
        self.nameLabel.backgroundColor = [UIColor clearColor];
        self.nameLabel.textAlignment = NSTextAlignmentCenter;
        self.nameLabel.textColor = DSRGBA(124, 124, 124, 1);
        // 选中时字体颜色
        self.nameLabel.highlightedTextColor = DSRGBA(219, 21, 26, 1);
        [self.contentView addSubview:self.nameLabel];
        self.baiView = [[BaseUIView alloc] init];
//        self.baiView.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.baiView];
        
        self.view = [[BaseUIView alloc] init];
//        self.view.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:_view];
        self.view.frame = CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height);
        
        self.redView = [[UIView alloc] init];
        self.redView.backgroundColor = [UIColor redColor];
        self.redView.frame = CGRectMake(0, 0, 3, self.view.frame.size.height);
        [self.view addSubview:self.redView];
        
        // 选中cell的时候 背景View
        self.selectedBackgroundView = self.view;
    }
    return self;
}

-(void)layoutSubviews{
    [super layoutSubviews];
    self.nameLabel.frame = CGRectMake(0, 0, self.contentView.frame.size.width , 48);
    self.baiView.frame = CGRectMake(0, 48, self.contentView.frame.size.width, 2);
    
    
    
}
-(void)setLeftModel:(LeftRecommendModel *)leftModel{
    _leftModel = leftModel;
    self.nameLabel.text = leftModel.name;
}


@end
